﻿using Ecommerce.API.Application.Command.Eunmcommand;
using Ecommerce.Domain.Eunm;
using Ecommerce.Services.Eunm;
using MediatR;

namespace Ecommerce.API.Application.CommandHandlers.EunmHander
{
    public class EunmGetCommandHandle : IRequestHandler<EunmGetCommand, List<Meunm>>
    {
        private readonly IEunmServices services;

        public EunmGetCommandHandle(IEunmServices services)
        {
            this.services = services;
        }

        public Task<List<Meunm>> Handle(EunmGetCommand request, CancellationToken cancellationToken)
        {
            return services.GetMeunms(request.Eid);
        }
    }
}
